import { type RouteRecordRaw } from 'vue-router';

const constantRoutes: RouteRecordRaw[] = [
  {
    name: '/',
    path: '/',
    redirect: '/home',
  },
  {
    name: '404',
    path: '/404',
    component: () => import('@/view/error/404.vue'),
  },
  {
    name: 'test',
    path: '/test',
    component: () => import('@/view/test/index.vue'),
  },
  {
    name: 'home',
    path: '/home',
    component: () => import('@/view/home/index.vue'),
  },
  {
    name: 'ftto',
    path: '/ftto',
    component: () => import('@/view/ftto/index.vue'),
    meta: {
      permissions: ['lis.ftto'],
    },
  },
  {
    name: 'pon',
    path: '/pon',
    component: () => import('@/view/pon/index.vue'),
    meta: {
      permissions: ['lis.pon'],
    },
  },
  {
    name: 'raw',
    path: '/raw',
    component: () => import('@/view/raw-report/index.vue'),
    meta: {
      permissions: ['lis.raw'],
    },
  },
  {
    name: 'setting',
    path: '/setting',
    component: () => import('@/view/setting/index.vue'),
    meta: {
      permissions: ['lis.setting'],
    },
  },
];

export default constantRoutes;
